package com.yuke.cloud.service.uac.dao;

import com.yuke.cloud.common.core.mybatis.MyMapper;
import com.yuke.cloud.service.api.uac.dto.UserLoginInfoDto;
import com.yuke.cloud.service.uac.entity.AccUserToken;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AccUserTokenMapper extends MyMapper<AccUserToken> {

    /**
     * Select token list list.
     *
     * @param userToken the user token
     *
     * @return the list
     */
    List<AccUserToken> selectTokenList(AccUserToken userToken);

    /**
     * 超时token更新为离线.
     *
     * @param map the map
     *
     * @return the int
     */
    int batchUpdateTokenOffLine(Map<String, Object> map);

    /**
     * 查询超时token Id 集合.
     *
     * @return the list
     */
    List<Long> listOffLineTokenId();

    List<UserLoginInfoDto> getUserDeviceToken(@Param("userId") Long userId);
}